﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Marmat.Foundation
{
    /// <summary>
    /// 按钮项的定义
    /// </summary>
    public class ButtonItem : IButtonItem
    {

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Caption { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public Image Icon { get; set; }

        /// <summary>
        /// 获取或设置按钮的可用状态。
        /// </summary>
        [DefaultValue(true)]
        public bool Enabled { get; set; } = true;

        /// <summary>
        /// 构建 Marmat.Foundation.ButtonItem 类的新实例。
        /// </summary>
        public ButtonItem()
        {
        }

        /// <summary>
        /// 构建 Marmat.Foundation.ButtonItem 类的新实例。
        /// </summary>
        /// <param name="name">名称</param>
        public ButtonItem(string name)
        {
            this.Name = name;
        }

        /// <summary>
        /// 构建 Marmat.Foundation.ButtonItem 类的新实例。
        /// </summary>
        /// <param name="name">名称</param>
        /// <param name="caption">标题</param>
        public ButtonItem(string name, string caption)
        {
            this.Name = name;
            this.Caption = caption;
        }

        /// <summary>
        /// 构建 Marmat.Foundation.ButtonItem 类的新实例。
        /// </summary>
        /// <param name="name">名称</param>
        /// <param name="caption">标题</param>
        /// <param name="icon">图标</param>
        public ButtonItem(string name, string caption, System.Drawing.Image icon)
        {
            this.Name = name;
            this.Caption = caption;
            this.Icon = icon;
        }
    }
}
